<?php
/**
 * Created by PhpStorm.
 * User: fengzi
 * Date: 2019/6/3
 * Time: 14:29
 */

namespace app\vehicle\model;
use think\Model;

class OrderComment extends Model
{
    public function getCreatetimeAttr($value){
        return date('Y-m-d',$value);
    }
    public function user(){
        return $this->hasOne('user','id','user_id')->field('id,nick_name,head_pic');
    }

    public function orderCommentImg(){
        return $this->hasOne('order_comment_img','comment_id','id')->field('comment_id,thumb');
    }
}